package com.lhy.mymall.request;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author: 卢辉宇
 * @date: 2022/12/16 20:54
 * @description: 更新请求参数封装类
 */
@Data
public class UpdateProductReq {

    @NotNull(message = "id不能为空")
    private Integer id;

    private String name;

    private String image;

    private String detail;

    private Integer categoryId;

    @Min(value = 1,message = "价格不能小于1")
    private Integer price;

    @Max(value = 10000,message = "库存不能大于10000")
    private Integer stock;

    private Integer status;

}
